home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOX10DOS.ZIP / sox.1 < prev    next >
Text File  |  1993-07-02  |  23KB  |  463 lines

  1.  
  2.  
  3.  
  4.           SOX(1)                       386/ix                        SOX(1)
  5.  
  6.  
  7.  
  8.           NAME
  9.                sox - SOund eXchange - universal sound sample translator
  10.  
  11.           SYNOPSIS
  12.                ssssooooxxxx _i_n_f_i_l_e _o_u_t_f_i_l_e
  13.                ssssooooxxxx _i_n_f_i_l_e _o_u_t_f_i_l_e [[[[ _e_f_f_e_c_t [[[[ _e_f_f_e_c_t _o_p_t_i_o_n_s ... ]]]] ]]]]
  14.                ssssooooxxxx _i_n_f_i_l_e ----eeee _e_f_f_e_c_t [[[[ _e_f_f_e_c_t _o_p_t_i_o_n_s ... ]]]]
  15.                ssssooooxxxx [ _g_e_n_e_r_a_l _o_p_t_i_o_n_s  ]]]] [[[[ _f_o_r_m_a_t _o_p_t_i_o_n_s  ]]]] _i_f_i_l_e [[[[ _f_o_r_m_a_t
  16.                _o_p_t_i_o_n_s  ]]]] _o_f_i_l_e [[[[ _e_f_f_e_c_t [ _e_f_f_e_c_t _o_p_t_i_o_n_s ... ]]]] ]]]]
  17.                _G_e_n_e_r_a_l _o_p_t_i_o_n_s:  [[[[ ----VVVV ]]]] [[[[ ----vvvv _v_o_l_u_m_e ]]]]
  18.                _F_o_r_m_a_t _o_p_t_i_o_n_s:  [[[[ ----tttt _f_i_l_e_t_y_p_e ]]]] [[[[ ----rrrr _r_a_t_e ]]]] [[[[ ----ssss////----uuuu////----UUUU////----AAAA ]]]]
  19.                [[[[ ----bbbb////----wwww////----llll////----ffff////----dddd////----DDDD ]]]] [[[[ ----cccc _c_h_a_n_n_e_l_s ]]]] [[[[ ----xxxx ]]]]
  20.                _E_f_f_e_c_t_s:
  21.                     ccccooooppppyyyy
  22.                     rrrraaaatttteeee
  23.                     aaaavvvvgggg
  24.                     ssssttttaaaatttt
  25.                     eeeecccchhhhoooo _d_e_l_a_y _v_o_l_u_m_e [[[[ _d_e_l_a_y _v_o_l_u_m_e ... ]]]]
  26.                     vvvviiiibbbbrrrroooo _s_p_e_e_d [[[[ _d_e_p_t_h ]]]]
  27.                     lllloooowwwwpppp _c_e_n_t_e_r
  28.                     hhhhiiiigggghhhhpppp _c_e_n_t_e_r
  29.                     bbbbaaaannnndddd [[[[ -_n ]]]] _c_e_n_t_e_r [[[[ _w_i_d_t_h ]]]]
  30.  
  31.           DESCRIPTION
  32.                _S_o_x translates sound files from one format to another, pos-
  33.                sibly doing a sound effect.
  34.  
  35.           OPTIONS
  36.                The option syntax is a little grotty, but in essence:
  37.                     sox file.au file.voc
  38.                translates a sound sample in SUN Sparc .AU format into a
  39.                SoundBlaster .VOC file, while
  40.                     sox -v 0.5 file.au -rate 12000 file.voc rate
  41.                does the same format translation but also lowers the ampli-
  42.                tude by 1/2 and changes the sampling rate from 8000 hertz to
  43.                12000 hertz via the rrrraaaatttteeee _s_o_u_n_d _e_f_f_e_c_t loop.
  44.  
  45.                File type options:
  46.  
  47.                ----tttt _f_i_l_e_t_y_p_e
  48.                          gives the type of the sound sample file.
  49.  
  50.                ----rrrr _r_a_t_e   Give sample rate in Hertz of file.
  51.  
  52.                ----ssss////----uuuu////----UUUU////----AAAA
  53.                          The sample data is signed linear (2's complement),
  54.                          unsigned linear, U-law (logarithmic), or A-law
  55.                          (logarithmic).  U-law and A-law are the U.S. and
  56.                          international standards for logarithmic telephone
  57.                          sound compression.
  58.  
  59.                ----bbbb////----wwww////----llll////----ffff////----dddd////----DDDD
  60.                          The sample data is in bytes, 16-bit words, 32-bit
  61.  
  62.  
  63.           Rev.                                                       Page 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.           SOX(1)                       386/ix                        SOX(1)
  71.  
  72.  
  73.  
  74.                          longwords, 32-bit floats, 64-bit double floats, or
  75.                          80-bit IEEE floats.  Floats and double floats are
  76.                          in native machine format.
  77.  
  78.                ----xxxx        The sample data is in XINU format; that is, it
  79.                          comes from a machine with the opposite word order
  80.                          than yours and must be swapped according to the
  81.                          word-size given above.  Only 16-bit and 32-bit
  82.                          integer data may be swapped.  Machine-format
  83.                          floating-point data is not portable.  IEEE floats
  84.                          are a fixed, portable format. ???
  85.  
  86.                ----cccc _c_h_a_n_n_e_l_s
  87.                          The number of sound channels in the data file.
  88.                          This may be 1, 2, or 4; for mono, stereo, or quad
  89.                          sound data.
  90.  
  91.                General options:
  92.  
  93.                ----eeee        after the input file allows you to avoid giving an
  94.                          output file and just name an effect.  This is only
  95.                          useful with the ssssttttaaaatttt effect.
  96.  
  97.                ----vvvv _v_o_l_u_m_e Change amplitude (floating point); less than 1.0
  98.                          decreases, greater than 1.0 increases.  Note: we
  99.                          perceive volume logarithmically, not linearly.
  100.                          Note: see the ssssttttaaaatttt effect.
  101.  
  102.                ----VVVV        Print a description of processing phases.  Useful
  103.                          for figuring out exactly how _s_o_x is mangling your
  104.                          sound samples.
  105.  
  106.                The input and output files may be standard input and output.
  107.                This is specified by '-'.  The ----tttt _t_y_p_e option must be given
  108.                in this case, else _s_o_x will not know the format of the given
  109.                file.  The ----tttt,,,, ----rrrr,,,, ----ssss////----uuuu////----UUUU////----AAAA,,,, ----bbbb////----wwww////----llll////----ffff////----dddd////----DDDD and ----xxxx
  110.                options refer to the input data when given before the input
  111.                file name.  After, they refer to the output data.
  112.  
  113.                If you don't give an output file name, _s_o_x will just read
  114.                the input file.  This is useful for validating structured
  115.                file formats; the ssssttttaaaatttt effect may also be used via the ----eeee
  116.                option.
  117.  
  118.           FILE TYPES
  119.                _S_o_x needs to know the formats of the input and output files.
  120.                File formats which have headers are checked, if that header
  121.                doesn't seem right, the program exits with an appropriate
  122.                message.  Currently, raw (no header) binary and textual
  123.                data, IRCAM Sound Files, Sound Blaster, SPARC .AU
  124.                (w/header), Mac HCOM, PC/DOS .SOU, Sndtool, and Sounder,
  125.                NeXT .SND, Windows 3.1 RIFF/WAV, Turtle Beach .SMP, CD-R,
  126.                and Apple/SGI AIFF and 8SVX formats are supported.
  127.  
  128.  
  129.           Rev.                                                       Page 2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.           SOX(1)                       386/ix                        SOX(1)
  137.  
  138.  
  139.  
  140.                ....aaaaiiiiffffffff     AIFF files used on Apple IIc/IIgs and SGI.  Note:
  141.                          the AIFF format supports only one SSND chunk.  It
  142.                          does not support multiple sound chunks, or the
  143.                          8SVX musical instrument description format.  AIFF
  144.                          files are multimedia archives and and can have
  145.                          multiple audio and picture chunks.  You may need a
  146.                          separate archiver to work with them.
  147.  
  148.                ....aaaauuuu       SUN Microsystems AU files.  There are apparently
  149.                          many types of .au files; DEC has invented its own
  150.                          with a different magic number and word order. The
  151.                          .au handler can read these files but will not
  152.                          write them.  Some .au files have valid AU headers
  153.                          and some do not.  The latter are probably original
  154.                          SUN u-law 8000 hz samples.  These can be dealt
  155.                          with using the ....uuuullll format (see below).
  156.  
  157.                ....hhhhccccoooommmm     Macintosh HCOM files.  These are (apparently) Mac
  158.                          FSSD files with some variant of Huffman compres-
  159.                          sion.  The Macintosh has wacky file formats and
  160.                          this format handler apparently doesn't handle all
  161.                          the ones it should.  Mac users will need your
  162.                          usual arsenal of file converters to deal with an
  163.                          HCOM file under Unix or DOS.
  164.  
  165.                ....rrrraaaawwww      Raw files (no header).
  166.                          The sample rate, size (byte, word, etc), and style
  167.                          (signed, unsigned, etc.)  of the sample file must
  168.                          be given.  The number of channels defaults to 1.
  169.  
  170.                ....uuuubbbb,,,, ....ssssbbbb,,,, ....uuuuwwww,,,, ....sssswwww,,,, ....uuuullll
  171.                          These are several suffices which serve as a short-
  172.                          hand for raw files with a given size and style.
  173.                          Thus, uuuubbbb,,,, ssssbbbb,,,, uuuuwwww,,,, sssswwww,,,, and uuuullll correspond to
  174.                          "unsigned byte", "signed byte", "unsigned word",
  175.                          "signed word", and "ulaw" (byte).  The sample rate
  176.                          defaults to 8000 hz if not explicitly set, and the
  177.                          number of channels (as always) defaults to 1.
  178.                          There are lots of Sparc samples floating around in
  179.                          u-law format with no header and fixed at a sample
  180.                          rate of 8000 hz.  (Certain sound management
  181.                          software cheerfully ignores the headers.)  Simi-
  182.                          larly, most Mac sound files are in unsigned byte
  183.                          format with a sample rate of 11025 or 22050 hz.
  184.  
  185.                ....ssssffff       IRCAM Sound Files.
  186.                          SoundFiles are used by academic music software
  187.                          such as the CSound package, and the MixView sound
  188.                          sample editor.
  189.  
  190.                ....vvvvoooocccc      Sound Blaster VOC files.
  191.                          VOC files are multi-part and contain silence
  192.                          parts, looping, and different sample rates for
  193.  
  194.  
  195.           Rev.                                                       Page 3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.           SOX(1)                       386/ix                        SOX(1)
  203.  
  204.  
  205.  
  206.                          different chunks.  On input, the silence parts are
  207.                          filled out, loops are rejected, and sample data
  208.                          with a new sample rate is rejected.  Silence with
  209.                          a different sample rate is generated appropri-
  210.                          ately.  On output, silence is not detected, nor
  211.                          are impossible sample rates.
  212.  
  213.                ....aaaauuuuttttoooo     This is a ``meta-type'': specifying this type for
  214.                          an input file triggers some code that tries to
  215.                          guess the real type by looking for magic words in
  216.                          the header.  If the type can't be guessed, the
  217.                          program exits with an error message.  The input
  218.                          must be a plain file, not a pipe.  This type can't
  219.                          be used for output files.
  220.  
  221.                ....ccccddddrrrr      CD-R
  222.                          CD-R files are used in mastering music Compact
  223.                          Disks.  The file format is, as you might expect,
  224.                          raw stereo raw unsigned samples at 44khz.  But,
  225.                          there's some blocking/padding oddity in the for-
  226.                          mat, so it needs its own handler.
  227.  
  228.                ....ddddaaaatttt      Text Data files
  229.                          These files contain a textual representation of
  230.                          the sample data.  There is one line at the begin-
  231.                          ning that contains the sample rate.  Subsequent
  232.                          lines contain two numeric data items: the time
  233.                          since the beginning of the sample and the sample
  234.                          value.  Values are normalized so that the maximum
  235.                          and minimum are 1.00 and -1.00.  This file format
  236.                          can be used to create data files for external pro-
  237.                          grams such as FFT analyzers or graph routines.
  238.                          SOX can also convert a file in this format back
  239.                          into one of the other file formats.
  240.  
  241.                ....ssssmmmmpppp      Turtle Beach SampleVision files.
  242.                          SMP files are for use with the PC-DOS package Sam-
  243.                          pleVision by Turtle Beach Softworks. This package
  244.                          is for communication to several MIDI samplers. All
  245.                          sample rates are supported by the package,
  246.                          although not all are supported by the samplers
  247.                          themselves. Currently loop points are ignored.
  248.  
  249.                ....wwwwaaaavvvv      Windows 3.1 .WAV RIFF files.
  250.                          These appear to be very similar to IFF files, but
  251.                          not the same. They are the native sound file for-
  252.                          mat of Windows 3.1.  Obviously, Windows 3.1 is of
  253.                          such incredible importance to the computer indus-
  254.                          try that it just had to have its own sound file
  255.                          format.
  256.  
  257.           EFFECTS
  258.                Only one effect from the palette may be applied to a sound
  259.  
  260.  
  261.           Rev.                                                       Page 4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.           SOX(1)                       386/ix                        SOX(1)
  269.  
  270.  
  271.  
  272.                sample.  To do multiple effects you'll need to run _s_o_x in a
  273.                pipeline.
  274.  
  275.                copy                          Copy the input file to the
  276.                                              output file.  This is the
  277.                                              default effect if both files
  278.                                              have the same sampling rate,
  279.                                              or the rates are "close".
  280.  
  281.                rate                          Translate input sampling rate
  282.                                              to output sampling rate via
  283.                                              linear interpolation to the
  284.                                              Least Common Multiple of the
  285.                                              two sampling rates.  This is
  286.                                              the default effect if the two
  287.                                              files have different sampling
  288.                                              rates.  This is fast but
  289.                                              noisy:  the spectrum of the
  290.                                              original sound will be shifted
  291.                                              upwards and duplicated faintly
  292.                                              when up-translating by a mul-
  293.                                              tiple.
  294.  
  295.                avg                           Mix 4- or 2-channel sound file
  296.                                              into 2- or 1-channel file by
  297.                                              averaging the samples for dif-
  298.                                              ferent speakers.
  299.  
  300.                stat                          Do a statistical check on the
  301.                                              input file, and print results
  302.                                              on the standard error file.
  303.                                              ssssttttaaaatttt may copy the file
  304.                                              untouched from input to out-
  305.                                              put, if you select an output
  306.                                              file. The "Volume Adjustment:"
  307.                                              field in the statistics gives
  308.                                              you the argument to the ----vvvv
  309.                                              _n_u_m_b_e_r which will make the
  310.                                              sample as loud as possible.
  311.  
  312.                echo [ _d_e_l_a_y _v_o_l_u_m_e ...  ]]]]    Add echoing to a sound sample.
  313.                                              Each delay/volume pair gives
  314.                                              the delay in seconds and the
  315.                                              volume (relative to 1.0) of
  316.                                              that echo.  If the volumes add
  317.                                              up to more than 1.0, the sound
  318.                                              will melt down instead of fad-
  319.                                              ing away.
  320.  
  321.                vibro _s_p_e_e_d  [[[[ _d_e_p_t_h ]]]]        Add the world-famous Fender
  322.                                              Vibro-Champ sound effect to a
  323.                                              sound sample by using a sine
  324.                                              wave as the volume knob.
  325.  
  326.  
  327.           Rev.                                                       Page 5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.           SOX(1)                       386/ix                        SOX(1)
  335.  
  336.  
  337.  
  338.                                              SSSSppppeeeeeeeedddd gives the Hertz value of
  339.                                              the wave.  This must be under
  340.                                              30.  DDDDeeeepppptttthhhh gives the amount
  341.                                              the volume is cut into by the
  342.                                              sine wave, ranging 0.0 to 1.0
  343.                                              and defaulting to 0.5.
  344.  
  345.                lowp _c_e_n_t_e_r                   Apply a low-pass filter.  The
  346.                                              frequency response drops loga-
  347.                                              rithmically with _c_e_n_t_e_r fre-
  348.                                              quency in the middle of the
  349.                                              drop.  The slope of the filter
  350.                                              is quite gentle.
  351.  
  352.                highp _c_e_n_t_e_r                  Apply a high-pass filter.  The
  353.                                              frequency response drops loga-
  354.                                              rithmically with _c_e_n_t_e_r fre-
  355.                                              quency in the middle of the
  356.                                              drop.  The slope of the filter
  357.                                              is quite gentle.
  358.  
  359.                band [[[[ -_n ]]]] _c_e_n_t_e_r [[[[ _w_i_d_t_h ]]]]  Apply a band-pass filter.  The
  360.                                              frequency response drops loga-
  361.                                              rithmically around the _c_e_n_t_e_r
  362.                                              frequency.  The _w_i_d_t_h gives
  363.                                              the slope of the drop.  The
  364.                                              frequencies at _c_e_n_t_e_r + _w_i_d_t_h
  365.                                              and _c_e_n_t_e_r - _w_i_d_t_h will be
  366.                                              half of their original ampli-
  367.                                              tudes.  BBBBaaaannnndddd defaults to a
  368.                                              mode oriented to pitched sig-
  369.                                              nals, i.e. voice, singing, or
  370.                                              instrumental music.  The -_n
  371.                                              (for noise) option uses the
  372.                                              alternate mode for un-pitched
  373.                                              signals.  BBBBaaaannnndddd introduces
  374.                                              noise in the shape of the
  375.                                              filter, i.e. peaking at the
  376.                                              _c_e_n_t_e_r frequency and settling
  377.                                              around it.
  378.  
  379.                _S_o_x enforces certain effects.  If the two files have dif-
  380.                ferent sampling rates, the requested effect must be one of
  381.                ccccooooppppyyyy,,,, or rrrraaaatttteeee,,,, If the two files have different numbers of
  382.                channels, the aaaavvvvgggg effect must be requested.
  383.  
  384.                reverse                       Reverse the sound sample com-
  385.                                              pletely.  Included for finding
  386.                                              Satanic subliminals.
  387.  
  388.           BUGS
  389.                The syntax is horrific.  It's very tempting to include a
  390.                default system that allows an effect name as the program
  391.  
  392.  
  393.           Rev.                                                       Page 6
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.           SOX(1)                       386/ix                        SOX(1)
  401.  
  402.  
  403.  
  404.                name and just pipes a sound sample from standard input to
  405.                standard output, but the problem of inputting the sample
  406.                rates makes this unworkable.
  407.  
  408.           FILES
  409.           SEE ALSO
  410.           NOTICES
  411.                The echoplex effect is:
  412.                    Copyright (C) 1989 by Jef Poskanzer.
  413.                    Permission to use, copy, modify, and distribute this
  414.                software and its
  415.                    documentation for any purpose and without fee is hereby
  416.                granted, provided
  417.                    that the above copyright notice appear in all copies and
  418.                that both that
  419.                    copyright notice and this permission notice appear in
  420.                supporting
  421.                    documentation.  This software is provided "as is"
  422.                without express or
  423.                    implied warranty.
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.           Rev.                                                       Page 7
  460.  
  461.  
  462.  
  463.